package com.example.demo.java8.functional;

import java.io.Serializable;

/**
 * Description: "::"引用<br/>
 *
 * @author Sender<br   />;
 * @taskId <br/>
 * multi constructors <br/>
 */
public class Person implements Serializable {
    private static final long serialVersionUID = -3352964822205725675L;

    private String nickName;

    private String realName;

    private String userId;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Person() {
    }

    public Person(String nickName, String realName) {
        this.nickName = nickName;
        this.realName = realName;
    }

    @Override public String toString() {
        return "Person{" +
                "userId='" + userId +'\''+
                "nickName='" + nickName + '\'' +
                ", realName='" + realName + '\'' +
                '}';
    }
}

interface PersonFactory<P extends Person> {
    P create(String nickName, String realName);
}
